<template>
  <div class="home-header">
    <div class="left">
      <div class="iconfont icon-back">&#xe743;</div>
    </div>
    <div class="input"><span class="iconfont">&#xe7b3;</span>输入城市/景点/游玩主题</div>
    <div class="right" @click="$router.push('/city')">{{ city }}<span class="iconfont">&#xe6aa;</span></div>
  </div>
</template>

<script>
import { mapState } from 'vuex';

export default {
  name: 'home-header',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
@import '~styles/variable.styl';

.home-header
  display: flex
  line-height: .86rem
  background: $bgColor
  color: #fff
  .left
    width: .64rem
    .icon-back
      text-align: center
      font-size: .6rem
  .input
    flex-grow: 1
    height: .62rem
    line-height: .62rem
    margin-top: .12rem
    margin-left: .2rem
    padding-left: .08rem
    background: #fff
    border-radius: .1rem
    color: #ccc
  .right
    min-width: 1.04rem
    padding 0 .1rem
    text-align: center
</style>